home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / rayfiles / rsdefs / examples / ring.ray < prev    next >
Text File  |  1994-08-09  |  4KB  |  136 lines

  1. /************************************************************************
  2.  *
  3.  *      ring.ray
  4.  *
  5.  *      This is an example file for the rsdefs package.
  6.  *
  7.  *      Please do not edit this file, or any of the other files in
  8.  *      this package!  Make additions to these in your own separate
  9.  *      file.  If you think you have something that should be added
  10.  *      permanently, please send it to Larry Coffin and/or David
  11.  *      DeBry (email addresses listed below).  If we include it in
  12.  *      the next release, we'll put your name in the contributor's
  13.  *      list.
  14.  *
  15.  *      Contributors (in alphabetical order):
  16.  *          Larry Coffin <lcoffin@clciris.chem.umr.edu>
  17.  *          David DeBry <ddebry@dsd.es.com>
  18.  *
  19.  ****************************************************************************
  20.  **    Ring.ray
  21.  **
  22.  **    By Larry Coffin
  23.  **    Copyright (C) 1992
  24.  **
  25.  **    This is a scene file of a ring with a large diamond in the center
  26.  **    surrounded by rubys and sapphires all on a gold band.  This scene
  27.  **    file uses the surfaces and definitions in the rsdefs package.
  28.  **    The jemstone object is in the file jewel8pt.ray.
  29.  **
  30.  **    Note: with the settings below, this scene took 5 hours to render
  31.  **    on an IBM530/RS6000.
  32.  **
  33.  */
  34. #define MAIN
  35.  
  36. /***************************************************************************
  37.  *    Include the rsdefs files
  38.  */
  39. #include "defs.rh"
  40.  
  41. /***************************************************************************
  42.  *    Number of frames to be used for animation.  (see the ring instance
  43.  *    below
  44.  */
  45. #define NUMFRAMES 1
  46.  
  47. /***************************************************************************
  48.  *    Jemstone and band surfaces.
  49.  */
  50. #define MAIN_SURF RSSdiamond_blue
  51. #define SAT_SURF1 RSSruby
  52. #define SAT_SURF2 RSSsapphire
  53. #define BASE_SURF RSSgold
  54.  
  55. RSFtv_final()
  56. RSF4x3screen(.25)
  57.  
  58. eyep 1 -35 5
  59.  
  60. /***************************************************************************
  61.  *  Maxdepth is set high because there are noticeable artifacts in the
  62.  * diamond at much(?) lower values.
  63.  */
  64. maxdepth 10
  65. sample 5
  66.  
  67. aperture .03
  68.  
  69. background 0.539 0.746 1.000
  70.  
  71. light 1 1 1 point  (50*12) (-50*12) (50*12)
  72.  
  73. frames NUMFRAMES
  74. shutter 0
  75.  
  76. name band
  77.     torus 2 .1  0 0 0   0 0 1
  78.     scale 1 1 3
  79.  
  80. /***************************************************************************
  81.  *    One pair of satellite jems.
  82.  */
  83. name sat_jems list
  84.     RSPmounted_jewel8pt(,SAT_SURF1(),BASE_SURF())
  85.         RSMscale(.45)
  86.         rotate 0 1 0  22.5
  87.         translate 0 -2.1 .85
  88.         rotate 0 1 0 22.5
  89.     RSPmounted_jewel8pt(,SAT_SURF2(),BASE_SURF())
  90.         RSMscale(.45)
  91.         rotate 0 1 0  22.5
  92.         translate 0 -2.1 .85
  93.         rotate 0 1 0 67.5
  94. end
  95.  
  96. /***************************************************************************
  97.  *    The whole ring!
  98.  */
  99. name ring list
  100.     object BASE_SURF() band
  101.     list
  102.         RSPmounted_jewel8pt(,MAIN_SURF(),BASE_SURF())
  103.             RSMscale(.9)
  104.             translate 0 -2.1 0
  105.         object sat_jems
  106.         object sat_jems
  107.             rotate 0 1 0 90
  108.         object sat_jems
  109.             rotate 0 1 0 180
  110.         object sat_jems
  111.             rotate 0 1 0 270
  112.     end
  113.         rotate 0 1 0 -22.4
  114.         translate 0 -.1 0
  115.     RSProundeddisc(name mounting_base,.95, 0,-2.15,0, 0,-1,0, .05)
  116.     object BASE_SURF() mounting_base
  117. end
  118.  
  119. /***************************************************************************
  120.  *    The ring in a fasionable pose!  (Replace the "10" with the
  121.  *    commented-out stuff to get the ring to rotate one full revolution
  122.  *    in NUMFRAMES frames.  This starts with the jems facing away from
  123.  *    the viewer.)
  124.  */
  125. object ring
  126.     rotate 1 0 0 -20
  127.     rotate 0 0 1 10 /*(180 - frame *(360/NUMFRAMES))*/
  128.  
  129.  
  130. /***************************************************************************
  131.  *    A nice background/floor.
  132.  */
  133. name floor plane 0 0 -3.001  0 0 1
  134. RSTnamed_marb_check1(floor,6)
  135.  
  136.